package c03数据类型和运算符;

public class 定义多个变量时串联赋值并运算 {
	public static void main(String[] args) {
		//int i=j=k=l=0;//错误！！！
		int i, j, k, l;
		i = j = k = l = 1;//正确！！！
		i += j -= k *= l += 1;//正确！！运算顺序为由右到左！
		System.err.println(i + "," + j + "," + k + "," + l);
//		i+=j-=k*=l++=0;//错误！因为l++最优先，运算结果是常量，不能放于等号左边被赋值！
	}

}
